package org.dei.perla.sys.device.channel.frame.address.concrete;

import org.dei.perla.sys.device.channel.frame.address.FrameAddress;

/**
 * Questa classe è un esempio di un FrameAddress per supportare canali
 * Addressful
 *
 */
public class SimpleFrameAddress extends FrameAddress {

	public SimpleFrameAddress() {
		super();
	}
	
	public SimpleFrameAddress(Integer parAddress) {
		super(parAddress);
	}
	
	public Integer getAddress() {
		return (Integer) this.pAddress;
	}

	public void setAddress(Integer parAddress) {
		super.setAddress((Integer) parAddress);
	}

	@Override
	public boolean equals(FrameAddress parFrameAddress) {
		if ( parFrameAddress.getAddress().equals(this.pAddress) ) {
			return true;
		} else {
			return false;
		}
	}
	
	public String toString() {
		String s = "SimpleFrameAddress( " + getAddress().toString() + "  )";
		return s;
	}

	@Override
	public void setAddressFromString(String parAddress) {
		this.setAddress((new Integer(parAddress)));
	}
	
	

}
